import {ResponseData} from "@/api/common/type";

export interface LoginForm {
    email: string,
    password: string,
    cheatCode: string,
    isCheat: boolean
}

//用户分配权限
export interface UserRoleForm {
    roleUuidList: string[],
    userUuid: string
}

//添加用户
export interface UserAddOrUpdateForm {
    email: string,
    username: string,
    password?: string,
    uuid?:string
}

//定义获取用户信息返回数据类型
export interface UserRouterReponseData extends ResponseData{
    result:{
        routerList:string[],
        buttonList:string[]
    }
}

//定义获取用户分页列表
export interface UserListReponseData extends ResponseData{
    result:{
        data:UserList,
        page:number,
        items:number,
        pageSize:number,
        currentPage:number,
        pageCount:number
    }
}

export interface UserList {
    userList: UserInfo[]
}

//获取当前登录用户对象
export interface UserInfoReponseData extends ResponseData{
    result:{
        userInfo:UserInfo
    }
}

export interface UserInfo {
        userUuid: string,
        id: null,
        username: string,
        password: string,
        salt: string,
        email: string,
        type: number,
        status: string,
        headerUrl: string,
        createTime: string,
        coin: number,
        careerDirection: string,
        hobby: string,
        isVip: string,
        vipLeftDays: number,
        userAddressProvince: any,
        userAddressCity: any,
        userAddressRegion: any,
        updateUsernameTime: any
}
